package stream;

import cn.hutool.core.util.RandomUtil;

import java.util.stream.IntStream;

public class IntStreamTest {
    public static void main(String[] args) {
        IntStream.range(1, 10).forEach(System.out::println);
        IntStream.rangeClosed(1, 10).forEach(System.out::println);
        IntStream.iterate(1, i -> i + 2).limit(10).forEach(System.out::println);
        IntStream.generate(() -> RandomUtil.randomInt()).limit(10).forEach(System.out::println);
    }
}
